// 签名
import _bale from '../utils/package.js'
// 获取不同的接口地址
import { USER_API,COMMON_API } from '../config/index.js'
import { Service } from '../utils/server.js'
class RebateModel extends Service {
  // 查询返利结算信息
  getRebate(params) {
    return this.postRequest(USER_API + '/member/queryRebate', {
      data: _bale('queryRebate', params)
    })
  }
  //返利明细
  getRebateDetails(params){
    return this.postRequest(USER_API + '/member/queryRebateDetails', {
      data: _bale('queryRebateDetails', params)
    })
  }
  //查看默认到账方式
  queryAccount(params) {
    return this.postRequest(COMMON_API + '/cash/queryAccount', {
      data: _bale('queryAccount', params)
    })
  }

  // 查询月绩效数据
  queryPerformance(params) {
    return this.postRequest(USER_API + '/member/queryPerformance', {
      data: _bale('queryPerformance', params)
    })
  }

  // 查询佣金排名
  queryRebateRanking(params) {
    return this.postRequest(USER_API + '/member/queryRebateRanking', {
      data: _bale('queryRebateRanking', params)
    })
  }

  // 查询今日绩效明细
  queryDayAchievements(params) {
    return this.postRequest(USER_API + '/member/queryDayAchievements', {
      data: _bale('queryDayAchievements', params)
    })
  }

  // 本月绩效明细
  queryAchievements(params) {
    return this.postRequest(USER_API + '/member/queryAchievements', {
      data: _bale('queryAchievements', params)
    })
  }
}


export { RebateModel }
